<!doctype html>
<html lang="zh-hans">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<!-- css -->
<link rel="stylesheet" href='<?=base_url().'resource/lib/bootstrap/css/bootstrap.min.css'?>'>
<link rel="stylesheet" href='<?=base_url().'resource/lib/magicsuggest-master/magicsuggest-min.css'?>'>
<?php if ($showdebug==false): ?>
<link rel="stylesheet" href='<?=base_url().'resource/css/debug.css'?>'>
<?php endif; ?>
<!-- js -->
<script src='<?=base_url().'resource/lib/bootstrap/jquery-2.1.1.min.js'?>'></script>
<script src='<?=base_url().'resource/lib/bootstrap/js/bootstrap.min.js'?>'></script>
<script src='<?=base_url().'resource/lib/magicsuggest-master/magicsuggest-min.js'?>'></script>

<title><?=$title;?></title>

<script>
var jsondata = {ms_1:[
						{id: 0,name: '挖掘机'}, 
						{id: 1,name: '装载机'}, 
						{id: 2,name: '其他'}
					  ],
					  
				ms_2:[ {id: 0,name: '卡特'}, 
				       {id: 1,name: '小松'},
				       {id: 2,name: '日立'},
				       {id: 3,name: '斗山'},
				       {id: 4,name: '现代'},
				       {id: 5,name: '沃尔沃'},
				       {id: 6,name: '神钢'},
				       {id: 7,name: '其他'}
				      ],
				      
				ms_3:[ {id: 0,name: '柳工'}, 
				       {id: 1,name: '临工'},
				       {id: 2,name: '成工'},
				       {id: 3,name: '龙工'},
				       {id: 4,name: '厦工'},
				       {id: 5,name: '山工'},
				       {id: 6,name: '其他'}
					  ]
				};





$(function() {



var ms_1 = $('#ms_1').magicSuggest({
	allowFreeEntries: false,   //这个参数很重要，如果你不需要用户自已创建标签，则用这个
	placeholder: '欲购买设备类型',
// 	value:[jsondata.ms_1[0],jsondata.ms_1[1]],
	valueField: 'id',    
	data: jsondata.ms_1
	});

$(ms_1).on('selectionchange', function(e, cb, s){
	var str = cb.getValue();
// 	alert('提示框中的值为：'+str);
	$("#ms_1_v").val(str);
	});



var ms_2 = $('#ms_2').magicSuggest({
	allowFreeEntries: false,   //这个参数很重要，如果你不需要用户自已创建标签，则用这个
	placeholder: '客户已有挖掘机品牌',
// 	value:[jsondata.ms_2[0],jsondata.ms_2[1]],
	valueField: 'id',    
	data: jsondata.ms_2
	});

$(ms_2).on('selectionchange', function(e, cb, s){
	var str = cb.getValue();
// 	alert('提示框中的值为：'+str);
	$("#ms_2_v").val(str);
	});
	

var ms_3 = $('#ms_3').magicSuggest({
	allowFreeEntries: false,   //这个参数很重要，如果你不需要用户自已创建标签，则用这个
	placeholder: '客户已有挖掘机品牌',
// 	value:[jsondata.ms_3[0]],
	valueField: 'id',    
	data: jsondata.ms_3
	});

$(ms_3).on('selectionchange', function(e, cb, s){
	var str = cb.getValue();
// 	alert('提示框中的值为：'+str);
	$("#ms_3_v").val(str);
	});




});





function tijiao(){ 
	$("#flag").val(2);
	var uid = sessionStorage.getItem("uid");	
	$("#uid").val(uid);
    document.form1.submit();
}     
    
</script>  
</head>
<body>
<div class="container" >
<div class="row">



<!-- 导航按钮 -->
<ul class="nav nav-pills">
  <li role="presentation"><a href="#">返回首页</a></li>
  <!-- 
  <li role="presentation" class="active"><a href="#">开始注册</a></li>-->
</ul>



<!-- 面板 -->
<div class="panel panel-default">
<div class="panel-heading">
   <p class="text-info"><span class="glyphicon glyphicon-paperclip" aria-hidden="true"></span> 推荐客户扩展信息(可选填)</p>
   <p class="bg-warning">填写详细的信息更有利于获取成交的佣金 : )</p>
    
</div>
<div class="panel-body">
<!-- 面板内容 start -->
<form class="form-horizontal" name="form1" action="<?=base_url().'index.php/client_control/add'?>" method="post">
<div class="input-group _hide">
<input class="form-control" id="openId"  name="openId" placeholder="openId" value="<?=isset($openId)?$openId:'';?>" >
<input class="form-control" id="flag"  name="flag" placeholder="flag" value="<?=isset($flag)?$flag:'';?>" >
<input class="form-control" id="uid"  name="uid" placeholder="uid" value="<?=isset($uid)?$uid:'';?>" >

<input class="form-control" id="name" name="name" placeholder="name" value="<?=$client['name'];?>">
<input class="form-control" id="phone" name="phone" placeholder="phone" value="<?=$client_phone['phone'];?>">
<input class="form-control" id="provinceId" name="provinceId" placeholder="provinceId" value="<?=isset($client['provinceId'])?$client['provinceId']:'';?>">
<input class="form-control" id="cityId" name="cityId" placeholder="cityId" value="<?=isset($client['cityId'])?$client['cityId']:'';?>">
<input class="form-control" id="areaId" name="areaId" placeholder="areaId" value="<?=isset($client['areaId'])?$client['areaId']:'';?>">


<input class="form-control" id="ms_1_v" name="gmsbType" placeholder="gmsbType" value="<?=isset($gmsbType)?$gmsbType:'';?>">
<input class="form-control" id="ms_2_v" name="wjjpp" placeholder="wjjpp" value="<?=isset($wjjpp)?$wjjpp:'';?>">
<input class="form-control" id="ms_3_v" name="zzjpp" placeholder="zzjpp" value="<?=isset($zzjpp)?$zzjpp:'';?>">

</div>

<!-- 
$client = array("id"=>$id , "name"=>"" , "provinceId"=>"" , "cityId"=>"" , "areaId"=>"" , "city"=>"" , "province"=>"" ,
				"area"=>"" , "comName"=>"" , "owner"=>"" , "creator"=>"" , "created"=>"" , "modified"=>"" , "gmsbType"=>"" ,
				"gmTimeType"=>"" , "wjjpp"=>"" , "zzjpp"=>"" , "memo"=>"" , "state"=>"" , "flag"=>"");
		
$client_phone = array("id"=>"","accountId"=>"" ,"phone"=>"" ,"created"=>"" ,"state"=>"");
		
 -->


<div class="form-group">
<label>客户所在公司名称</label>
<input id="comName"  name="comName" class="form-control" placeholder="客户所在公司" value="">
</div>

<div class="form-group">
<label>客户要购买设备类型</label>
<input id="ms_1" name="ms_1" class="form-control" >
</div>

<div class="form-group">
<label>客户欲购机时间描述</label>
<select id="gmTimeType" name="gmTimeType" class="form-control"  >
<option value = 0 > </option>
<option value = 1 >急需购买</option>
<option value = 2 >近期购买</option>
<option value= 3 >(有兴趣)想了解</option>
</select>
</div>

<div class="form-group">
<label>客户已有挖掘机品牌</label>
<input id="ms_2" name="ms_2" class="form-control" >
</div>

<div class="form-group">
<label>客户已有装载机品牌</label>
<input id="ms_3" name="ms_3" class="form-control" >
</div>
	

<div class="input-group">
<div class="input-group-addon"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></div>
<textarea id="memo" name="memo" class="form-control" rows="3" cols="10"  placeholder="备注"></textarea>
</div>


<!-- 协议 start 
<div class="form-group">
    <a class="btn btn-success" href="#" role="button"> 
    <span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span> 经纪人协议</a>
    <label><input type="checkbox"> 同意</label>      
</div>
-->



<div class="panel-footer">
    <div class="row">

        <div class="col-xs-4 col-xs-offset-4">
        <button type="button" class="btn btn-warning" onClick="tijiao()">确定 </button>
        </div>
    </div>
</div>

</form>
</div>
</div>


</div>
</div>
</body>
</html>